# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=ktextwidgets
pkgver=5.73.0
pkgrel=0
pkgdesc="Advanced text editing widgets"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-or-later"
depends_dev="qt5-qtspeech-dev kcompletion-dev kconfig-dev kconfigwidgets-dev ki18n-dev kiconthemes-dev kservice-dev kwidgetsaddons-dev sonnet-dev"
makedepends="$depends_dev extra-cmake-modules doxygen qt5-qttools-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/ktextwidgets-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="461ae15dd44ce0343dc269723462b3ef51d2343f61c8de6a201bc81068615262498da60683610585888291f66d27f19093f6b15ba753f3be423be399e57fefd5  ktextwidgets-5.73.0.tar.xz"
